// To parse this JSON data, do
//
//     final welcome = bannerRespFromJson(jsonString);

import 'dart:convert';

HomeBannerResp bannerRespFromJson(String str) => HomeBannerResp.fromJson(json.decode(str));

String bannerRespToJson(HomeBannerResp data) => json.encode(data.toJson());

class HomeBannerResp {
  List<BannerItemData> data;
  int errorCode;
  String errorMsg;

  HomeBannerResp({
    required this.data,
    required this.errorCode,
    required this.errorMsg,
  });

  factory HomeBannerResp.fromJson(Map<String, dynamic> json) => HomeBannerResp(
        data: List<BannerItemData>.from(json["data"].map((x) => BannerItemData.fromJson(x))),
        errorCode: json["errorCode"],
        errorMsg: json["errorMsg"],
      );

  Map<String, dynamic> toJson() => {
        "data": List<dynamic>.from(data.map((x) => x.toJson())),
        "errorCode": errorCode,
        "errorMsg": errorMsg,
      };
}

class BannerItemData {
  String desc;
  int id;
  String imagePath;
  int isVisible;
  int order;
  String title;
  int type;
  String url;

  BannerItemData({
    required this.desc,
    required this.id,
    required this.imagePath,
    required this.isVisible,
    required this.order,
    required this.title,
    required this.type,
    required this.url,
  });

  factory BannerItemData.fromJson(Map<String, dynamic> json) => BannerItemData(
        desc: json["desc"],
        id: json["id"],
        imagePath: json["imagePath"],
        isVisible: json["isVisible"],
        order: json["order"],
        title: json["title"],
        type: json["type"],
        url: json["url"],
      );

  Map<String, dynamic> toJson() => {
        "desc": desc,
        "id": id,
        "imagePath": imagePath,
        "isVisible": isVisible,
        "order": order,
        "title": title,
        "type": type,
        "url": url,
      };
}
